//
//  SearchView.swift
//  WuZhen
//
//  Created by 今安在 on 2024/3/25.
//

import SwiftUI

struct SearchView: View {
    @State var searchThings: String = ""
    
    var body: some View {
        NavigationView {
            VStack {
                HStack {
                    Image(systemName: "magnifyingglass")
                        .foregroundColor(.gray)
                    TextField("请输入您想搜索的内容...", text: $searchThings)
                        .textFieldStyle(RoundedBorderTextFieldStyle())
                }
                .padding()
                
                TabView{
                    TabViewContent(photoName: "IMG_8975",
                                   textTitle: "度假",
                                   textContent: "推窗而出，或许就与小桥流水的江南气息撞个满怀。")
                    TabViewContent(photoName: "IMG_8972",
                                   textTitle: "文化",
                                   textContent: "传统碰撞现代，在乌镇感受中国古老文化的非凡魅力和现代东方生活的融合")
                    TabViewContent(photoName: "2020051514373412757",
                                   textTitle: "木心美术馆",
                                   textContent: "应家乡乌镇竭诚邀请，于2006年回乡定居")
                    TabViewContent(photoName: "2023061116535140257",
                                   textTitle: "乌镇戏剧节",
                                   textContent: "十年归心，玉汝于成，戏剧与生活相遇在这个江南小镇，缔造一场属于所有戏剧爱好者与生活梦想家的烟雨大梦。")
                }
                .tabViewStyle(PageTabViewStyle())
                .frame(height: 300)
                .cornerRadius(25)
                
                Spacer()
            }
            .navigationTitle("搜索")
        }
    }
}

struct SearchView_Previews: PreviewProvider {
    static var previews: some View {
        SearchView()
    }
}
